package com.project.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.project.bean.PurchaseBean;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDate;
import java.util.List;

/**
 * @author lyl
 * description:
 */
@Mapper
public interface IPurchaseDao extends BaseMapper<PurchaseBean> {
    /**
     * 新建实体入库单
     *
     * @return
     */
    int addPurchase(@Param("purchaseBean") PurchaseBean purchaseBean);

    /**
     * 根据起始日期以及供应商名称分页显示订单信息
     *
     * @param supplierName
     * @param startDate
     * @param endDate
     * @return
     */
    List<PurchaseBean> showInfoByPage(@Param("supplierName") String supplierName, @Param("startDate") LocalDate startDate, @Param("endDate") LocalDate endDate);

    /**
     * 查询采购详情信息
     *
     * @param purchaseId
     * @return
     */
    PurchaseBean findPurchaseById(@Param("purchaseId") int purchaseId);

//    PurchaseBean findByUserIdSupplierId(@Param("userId") int userId, @Param("supplierId") int supplierId);
}
